package com.zb_study.Homework04;

public class Teacher extends Person {
    private double daySal;
    private int day;

    public Teacher(String name, double monthSal, double daySal, int day) {
        super(name, monthSal);
        this.daySal = daySal;
        this.day = day;
    }

    public double getDaySal() {
        return daySal;
    }

    public void setDaySal(double daySal) {
        this.daySal = daySal;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    @Override
    public void printSal() {
        System.out.print("教师  ");
        System.out.println(getName() + "全年工资为：" + (12 * getMonthSal() + daySal * day));
    }
}
